<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@include file="/common.jsp"%>
<!DOCTYPE html>
<html lang="zh">
<meta charset="utf-8">
<head></head>
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="form-registrationInfo-edit">
			<input id="riId" name="riId" value="${registrationInfo.riId}" type="hidden">
			<input id="taskId" name="taskId" value="${taskId}" type="hidden">

			<div class="form-group">
				<label class="col-sm-3 control-label">纳税人：</label>
				<div class="col-sm-8">
					<input id="riOwner" name="riOwner" value="${registrationInfo.riOwner}" class="form-control" type="text" disabled="disabled" />
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">单位名称：</label>
				<div class="col-sm-8">
					<input id="riCompany" name="riCompany" value="${registrationInfo.riCompany}" class="form-control" disabled="disabled" type="text" />
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">单位地址：</label>
				<div class="col-sm-8">
					<input id="riCompanyAddress" name="riCompanyAddress" value="${registrationInfo.riCompanyAddress}" disabled="disabled" class="form-control"
						type="text" />
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">证件类型：</label>
				<div class="col-sm-8">
					<input id="riOwnerIdCardType" name="riOwnerIdCardType" value="${registrationInfo.riOwnerIdCardType}" disabled="disabled" class="form-control"
						type="hidden" />
					<select  class="form-control" disabled>
						<option value="1" ${registrationInfo.riOwnerIdCardType ==1?'selected':'' }>身份证</option>
						<option value="2" ${registrationInfo.riOwnerIdCardType ==2?'selected':'' }>港澳台通行证</option>
						<option value="3" ${registrationInfo.riOwnerIdCardType ==3?'selected':'' }>结婚证</option>
						<option value="4" ${registrationInfo.riOwnerIdCardType ==4?'selected':'' }>驾驶证</option>
						<option value="5" ${registrationInfo.riOwnerIdCardType ==5?'selected':'' }>其他</option>
					</select>

				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">证件号：</label>
				<div class="col-sm-8">
					<input id="riOwnerIdCardNum" name="riOwnerIdCardNum" value="${registrationInfo.riOwnerIdCardNum}" disabled="disabled" class="form-control"
						type="text" />
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">停业时间：</label>
				<div class="col-sm-8">
					<input id="time" name="time" class="form-control" type="text" onblur="getTime()" disabled="disabled" />
				</div>
			</div>

			<div class="form-group">
				<label class="col-sm-3 control-label">停业期限：</label>
				<div class="col-sm-8">
					<div class="input-group">
						<input id="riStopEndTime" name="riStopEndTime" class="form-control" type="text" value="${registrationInfo.riStopEndTime}" disabled="disabled" />
						<div class="input-group-addon">日</div>
					</div>
				</div>
			</div>

			<div class="form-group">
				<label class="col-sm-3 control-label">&nbsp;</label>
				<div class="col-sm-8">
					<select id="flag" name="flag" class="form-control">
						<option value="true">通过</option>
						<option value="false">不通过</option>
					</select>
				</div>
			</div>

			<div class="form-group">
				<label class="col-sm-3 control-label">&nbsp;</label>
				<div class="col-sm-8">
					<a class="btn btn-primary btn-del" onclick="submitHandler()">
						<i class="fa fa-play"></i>
						提交审核
					</a>
				</div>
			</div>

		</form>
	</div>
	<script type="text/javascript">
	
	
		zaneDate({
			elem : '#time',
			format : 'yyyy-MM-dd',
			type : 'doubleday',
			min : new Date().Format("yyyy-MM-dd"),
			max : '2027-08-20',
			begintime : '<fmt:formatDate pattern="yyyy-MM-dd"  value="${registrationInfo.riStopStartTime}" />',
			endtime : '<fmt:formatDate pattern="yyyy-MM-dd"  value="${registrationInfo.riContinueTime}" />',
			change : (fulltime, begintime, endtime) => {
				$("#riStopEndTime").val(timeFn(begintime, endtime));
				$("#riStopStartTime").val(begintime);
				$("#riContinueTime").val(endtime);
			}
		});
	
		var prefix = "${ctx}/system/info";
	
		function submitHandler() {
			if ($.validate.form()) {
				$.operate.save(prefix + "/complete", $('#form-registrationInfo-edit').serialize(), function(data) {
					if (data.code == 0) {
						alert("操作成功");
						window.location.href = '${ctx}/toDoTask/list/registrationInfo';
					}
				});
	
			}
		}
	
		function getTime() {
			var riStopStartTime = $("#riStopStartTime").val();
			var riStopEndTime = $("#riStopEndTime").val();
			var days = timeFn(riStopStartTime, riStopEndTime);
		}
	</script>
</body>
</html>
